{% extends "blog/blog_post_list.html" %}
{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags %}

{% block meta_title %}{{ blog_post.meta_title }}{% endblock %}

{% block meta_keywords %}{% metablock %}
{% keywords_for blog_post as tags %}
{% for tag in tags %}{% if not forloop.first %}, {% endif %}{{ tag }}{% endfor %}
{% endmetablock %}{% endblock %}

{% block meta_description %}{% metablock %}
{{ blog_post.description }}
{% endmetablock %}{% endblock %}

{% block title %}
{% editable blog_post.title %}{{ blog_post.title }}{% endeditable %}
{% endblock %}

{% block breadcrumb_menu %}
{{ block.super }}

{% endblock %}

{% block main %}

	{% block blog_post_main%}
		{{ block.super }}
		
		{% block blog_post_list_post_content %}
			
		{% endblock %}
		{% block blog_post_detail_content %}
		{% editable blog_post.content %}
		{{ blog_post.content|richtext_filters|safe }}
		{% endeditable %}
		{% endblock %}
		
		{% block read_more%}
		{% endblock %}
	{% endblock %}	

{% block blog_post_detail_keywords %}
{% keywords_for blog_post as tags %}
{% if tags %}
{% spaceless %}
<ul class="list-inline tags">
    <li>{% trans "Tags" %}:</li>
    {% for tag in tags %}
    <li><a href="{% url "blog_post_list_tag" tag.slug %}">{{ tag }}</a></li>
    {% endfor %}
</ul>
{% endspaceless %}
{% endif %}
{% endblock %}

{% block blog_post_detail_rating %}
<div class="panel panel-default rating">
    <div class="panel-body">
    {% rating_for blog_post %}
    </div>
</div>
{% endblock %}

{% block blog_post_detail_sharebuttons %}
{% set_short_url_for blog_post %}

<div class="bottom-article">
		<ul class="meta-post">
		<li>Share</li>
		<li><a class="" target="_blank" href="http://twitter.com/home?status={{ blog_post.short_url|urlencode }}%20{{ blog_post.title|urlencode }}"><strong><i class="fa fa-twitter"></i> </strong></a></li>
		<li><a class="" target="_blank" href="http://facebook.com/sharer.php?u={{ request.build_absolute_uri }}&amp;t={{ blog_post.title|urlencode }}"><i class="fa fa-facebook"></i></a>

		</ul>
		
	</div>


{% endblock %}

{% block blog_post_previous_next %}
<ul class="pager">
{% with blog_post.get_previous_by_publish_date as previous %}
{% if previous %}
<li class="previous">
    <a href="{{ previous.get_absolute_url }}"><i class="fa fa-arrow-left"></i> {{ previous }}</a>
</li>
{% endif %}
{% endwith %}
{% with blog_post.get_next_by_publish_date as next %}
{% if next %}
<li class="next">
    <a href="{{ next.get_absolute_url }}">{{ next }} <i class="fa fa-arrow-right"></i>
{% endif %}
{% endwith %}
</ul>
{% endblock %}

{% block blog_post_detail_related_posts %}
{% if blog_post.related_posts.all %}
<div id="related-posts">
<h3>{% trans 'Related posts' %}</h3>
<ul class="list-unstyled">
{% for post in blog_post.related_posts.all %}
     <li><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}

{% block blog_post_detail_comments %}
{% if blog_post.allow_comments %}{% comments_for blog_post %}{% endif %}
{% endblock %}

{% endblock %}
